/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mundialfp.view.tables;

import javax.swing.JTable;
import javax.swing.ListSelectionModel;

/**
 * Headers no resizeables-Headers no reordenables-Acepta tipo Imagen-Sin lineas
 * divisorias- Seleccion unica
 *
 * @author pferraz
 */
public class TableCustom1 extends JTable {

    public TableCustom1(int numColumns) {
        super(0, numColumns);
        this.getTableHeader().setResizingAllowed(false);//Hace las columnas no resizeables
        this.getTableHeader().setReorderingAllowed(false);//Hace las columnas no reordenables
        this.setShowGrid(false);//Quita las lineas divisorias
        this.setTableHeader(null);//Quita los headers
        this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    }

    //  Returning the Class of each column will allow different
    //  renderers to be used based on Class
    @Override
    public Class getColumnClass(int column) {
        return getValueAt(0, column).getClass();
    }
}
